In a computer system operating in conjunction with a database (e.g., a relational database), data is typically stored in the form of tables, with each column of a given table representing a particular data attribute and each row representing a specific record. A user of the computer system accesses data from one or more tables by submitting a query to a database management system ("DBMS") associated with the computer system. The DBMS responds to the query by constructing a particular view of the data stored in the database and returning a responsive data set to the user.
It is common for users of such computer systems to submit ad hoc database queries, i.e., self-structured requests of any type and/or bounds, with no up-front knowledge or information as to how long the computer system will actually take to respond. In particular, databases can be very large and, depending upon various factors, such as the current operational load on the computer system and the complexity of a particular query, the elapsed time required to execute the query can vary widely--e.g., from less than a second to several hours, or even days.
This uncertain system response time may deter users from submitting certain queries, since they will not know whether they will get an immediate answer, or will have to wait for an extended period of time. The situation is especially problematic for computer system administrators who control the amount of system resource time that is expended by users submitting ad-hoc query requests. For example, it is not uncommon for multiple users to submit overlapping queries to a centralized computer system from separate respective user stations, e.g., personal computers or network terminals, potentially degrading overall system performance and efficiency.
As a result, system administrators have been known to establish processing resource time quotas, whereby users are allowed only a certain period of time in which to obtain a response to any given system query. Under these circumstances, the time period begins to run when a user submits a query. If a response is not returned by the system before a preset time limit is reached, the DBMS abandons any further execution of the query, leaving the user with no result whatsoever, even if a response may have otherwise been produced in just an instant later. Although this (somewhat crude) methodology may preserve overall system resources, it may decrease efficiency as a result of the wasted system resource time expended for processing queries that are abandoned at the time limit.
Thus, it would be desirable to provide an up-front estimation of the system response time required for returning a response to individual database queries prior to their actual execution, so that system resource time is not expended for those queries that will not be completed within an allowable or acceptable time period.